<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ page language="java" contentType="text/html;charset=UTF-8"%>
	<%@ include file="/taglibs.jsp"%>
	<%
		String path = request.getContextPath();
	%>
	<head>
		<jsp:include page="/common.jsp" />
		<%@ page isELIgnored="false"%>
		<title>时代网-赤峰的网上之家</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<script src="jquery-min.js" language="javascript"
			type="text/javascript"></script>
		<link id="setSkin" type="text/css" rel="stylesheet"
			href="theme_blue1227.css" />

		<link rel="stylesheet" type="text/css" href="style.css" />
		<script type="text/javascript">
			var path="<%=path%>";
			var str;
		</script>
		<link rel="stylesheet" type="text/css" href="headPic.css" />

		<script type="text/javascript" src="headPic.js">
		</script>
	</head>

	<body>
		<div id="mininav">
			<div id="mini_nav_qq_wrap">
				<div id="mini_nav_qq">
					<div class="mini_nav_fl">
						<ul>
							<li class="first">
								<a href="javascript:void(0)"
									onClick="SetHome(this,window.location)" target="_top">设为首页</a>
							</li>
							<li class="mobile">
								<a href="#" target="_blank" onclick="NavClickStat(2)">联系我们</a>
							</li>
							<li class="ipad">
								<a href="#" target="_blank" onclick="NavClickStat(4)">登陆</a>
							</li>
							<li>
								<a href="#" target="_blank">注册</a>
							</li>
							<li class="end">
								<a href="#" target="_blank" onclick="NavClickStat(3)">帮助</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="header">
			<div class="expo_nav" id="TextNav"
				onClick="register0410('topnav',1);">
				<style type="text/css">
.expo_nav .line {
	width: 14px;
}

.aline {
	width: 1px;
	height: 60px;
	background-color: lightgrey;
	margin: 3px 5px 0 5px;
}
</style>
				<div class="expo_logo">
					<a href="javascript:void(0);" onclick="gotoIndex()"><img
							src="menu_bg8.gif" width="115" height="50" border="0"
							style="margin-top: 5px;" />
					</a>
				</div>
				<c:forEach var="row" items="${fcList}" varStatus="status">
					<c:if test="${(status.index)%18==0 && status.index!=0}">
			</div>
			<div class="aline"></div>
			</c:if>
			<c:choose>
				<c:when test="${(status.index)%18==0 || status.index==0}">
					<div>
				</c:when>
				<c:otherwise>
					<c:if test="${(status.index)%6==0}">
						<br />
					</c:if>
				</c:otherwise>
			</c:choose>
			<a style="padding-left: 0px; padding-right: 3px;"
				href="javascript:void(0);"
				onclick="gotoFirstClassify('${row.firstClassId}');">${row.className}</a>
			</c:forEach>
		</div>
		</div>
		<div class="gg-g24 clearfix">
			<div id="" class="wgt-tab-gg left">
				<div class="tab-hd-gg-left">
					<ul>
						<c:forEach var="lhead" items="${lhaList}" varStatus="hi">
							<c:if test="${hi.index<3}">
								<c:choose>
									<c:when test="${hi.index==0}">
										<li id=${lhead.headAdvertId } class="tab-u current">${lhead.headName}</li>
									</c:when>
									<c:otherwise>
										<li id=${lhead.headAdvertId } class="tab-u">${lhead.headName}</li>
									</c:otherwise>
								</c:choose>
							</c:if>
						</c:forEach>
					</ul>
				</div>
				<div class="left tab-bd-gg display-control">
					<c:forEach var="lhead" items="${lhaList}" varStatus="hi">
						<c:if test="${hi.index<3}">
							<c:choose>
								<c:when test="${hi.index==0}">
									<div class="tab-con ${lhead.headAdvertId} cBlue current">
										<c:forEach var="hal" items="${lhead.headAdvertLists}"
											varStatus="hali">
											<a href="javascript:void(0);"
												onclick="gotoHeadAdvert('${hal.headAdvertListId }')">${hal.advertName}</a>
											<br />
										</c:forEach>
									</div>
								</c:when>
								<c:otherwise>
									<div class="tab-con ${lhead.headAdvertId} cBlue">
										<c:forEach var="hal" items="${lhead.headAdvertLists}"
											varStatus="hali">
											<a href="javascript:void(0);"
												onclick="gotoHeadAdvert('${hal.headAdvertListId }')">${hal.advertName}</a>
											<br />
										</c:forEach>
									</div>
								</c:otherwise>
							</c:choose>
						</c:if>
					</c:forEach>
				</div>
			</div>
			<div class="gg-g24-main cBlue">
				<div class="container" id="idTransformView2">
				  <ul class="slider slider2" id="idSlider2">
				  	<c:forEach var="headAp" items="${headAps}">
				  		<li><a href="javascript:void(0);" onclick="gotoCompanyDetail('${headAp.company.companyId }')"><img src=<%=path %>${headAp.picUrl }></img></a></li>
				  	</c:forEach>
				  </ul>
				
				  <ul class="num" id="idNum2">
				  	<c:forEach var="headAp" varStatus="hai" items="${headAps}">
				    <li>${hai.index+1 }</li>
				    </c:forEach>
				  </ul>
				</div>
			</div>
			<div id="cAn1_r" class="wgt-tab-gg right">
				<div class="tab-hd-gg-right">
					<ul>
						<c:forEach var="rhead" items="${rhaList}" varStatus="hr">
							<c:if test="${hr.index<3}">
								<c:choose>
									<c:when test="${hr.index==0}">
										<li id=${rhead.headAdvertId } class="tab-u current">${rhead.headName}</li>
									</c:when>
									<c:otherwise>
										<li id=${rhead.headAdvertId } class="tab-u">${rhead.headName}</li>
									</c:otherwise>
								</c:choose>
							</c:if>
						</c:forEach>
					</ul>
				</div>
				<div class="right tab-bd-gg display-control">
					<c:forEach var="rhead" items="${rhaList}" varStatus="hi">
						<c:if test="${hi.index<3}">
							<c:choose>
								<c:when test="${hi.index==0}">
									<div class="tab-con ${rhead.headAdvertId} cBlue current">
										<c:forEach var="har" items="${rhead.headAdvertLists}"
											varStatus="hali">
											<a href="javascript:void(0);"
												onclick="gotoHeadAdvert('${har.headAdvertListId }')">${har.advertName}</a>
											<br />
										</c:forEach>
									</div>
								</c:when>
								<c:otherwise>
									<div class="tab-con ${rhead.headAdvertId} cBlue">
										<c:forEach var="har" items="${rhead.headAdvertLists}"
											varStatus="hali">
											<a href="javascript:void(0);"
												onclick="gotoHeadAdvert('${har.headAdvertListId }')">${har.advertName}</a>
											<br />
										</c:forEach>
									</div>
								</c:otherwise>
							</c:choose>
						</c:if>
					</c:forEach>
				</div>
			</div>
		</div>

		<div class="search">
			<div style="margin: 15px auto;">
				<input type="text" id="searchValue" style="height: 25px; color: #808080;"
					onblur="if(!this.value)this.value='输入本地搜索...';return true;"
					onfocus="if(this.value=='输入本地搜索...')this.value='';return true;"
					value="输入本地搜索..." size=100></input>
				<button onclick="forSearch();">
					搜索
				</button>
				<a target="_self" href="#" style="margin-left: 5px;">住宅楼出售</a><a
					target="_self" href="#" style="margin-left: 5px;">饭店转兑</a><a
					target="_self" href="#" style="margin-left: 5px;">洗车王国</a>
				<br />
			</div>
		</div>
		</div>

		<div class="content">

			<div class="area">
				<div class="area-sub">
					<div id="product" class="mod product-mod">
						<h2 class="hd clearfix">
							<span class="mod-title"><a href="javascript:void(0);">同类推荐</a>
							</span>
						</h2>
						<div class="bd tab-bd display-control">
							<div class="tab-con current">
								<div class="product-map cBlue">
									<div class="product-item-mail clearfix">
										<strong><a class="icon" href="javascript:void(0);"
											onclick="gotoSecontClassify('${seconds.secClassId }')">${seconds.className}</a>
										</strong>
										<c:forEach var="company" items="${seconds.companies}"
											varStatus="si">
											<a href="<%=path%>/getComDel.do?companyId=${company.companyId }">${company.companyName}</a>
										</c:forEach>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div id="g5n1" class="mod wgt-tab">
						<c:forEach var="left" items="${row.leftRecommons}" varStatus="li">
							<div class="tab-hd tab-u-5 clearfix">
								<c:forEach var="ap" items="${left.advertPics}" varStatus="ai">
									<c:choose>
										<c:when test="${ai.index==0}">
											<span id=${ap.advertPicId } class="tab-u current">${ap.picName}</span>
										</c:when>
										<c:otherwise>
											<span id=${ap.advertPicId } class="tab-u">${ap.picName}</span>
										</c:otherwise>
									</c:choose>
								</c:forEach>
							</div>
							<div class="bd display-control">
								<c:forEach var="ap" items="${left.advertPics}" varStatus="ai">
									<c:choose>
										<c:when test="${ai.index==0}">
											<div class="tab-con ${ap.advertPicId} current">
												<ul class="mod-list sub-list">
													<a
														href="http://g.163.com/a?CID=6661&amp;Values=2515745839&amp;Redirect=http://www.qipai.cn/">
														<img src=<%=path%>
															${ap.picUrl}
																width="170" height="250" />
													</a>
												</ul>
											</div>
										</c:when>
										<c:otherwise>
											<div class="tab-con ${ap.advertPicId}">
												<ul class="mod-list sub-list">
													<a
														href="http://g.163.com/a?CID=6661&amp;Values=2515745839&amp;Redirect=http://www.qipai.cn/">
														<img src=<%=path%>
															${ap.picUrl}
																width="170" height="250" />
													</a>
												</ul>
											</div>
										</c:otherwise>
									</c:choose>
								</c:forEach>
							</div>
						</c:forEach>
					</div>
					<div class="gg gg-h100">
						<c:forEach var="left" items="${row.leftRecommons}" varStatus="li">
							<c:forEach var="ap" items="${left.advertPics}" varStatus="ai">
								<c:if test="${ai.index==4}">
									<a
										href="http://g.163.com/c?AID=41636&FlightID=750&Values=2348400489&Redirect=http://itown.163.com/sdk/"
										target="_blank"> <img width="190" height="100" border="0"
											alt="" src=<%=path%>${ap.picUrl}></img>> </a>
								</c:if>
							</c:forEach>
						</c:forEach>
					</div>
				</div>

				<div class="area-main">
					<div class="main-col-11">
						<h2>
							<strong>${company.companyName }</strong>
						</h2>
						<c:forEach var="ap" items="${company.advertPics}" varStatus="ai">
							
							<c:if test="${ap.displayOrder==1 && ap.location!=2 && ap.location!=1 && ap.location!=3 && ap.location!=4 && ap.location!=22}">
								<img src=<%=path%>${ap.picUrl} class="company-pic"></img>
							</c:if>
						</c:forEach>
						<div class="company-deltail">
							<span class="company-filed">负责人：</span><span>${company.linkMan}</span>
							<br />
							<span class="company-filed">电话：</span><span>${company.phone
								}</span>
							<br />
							<span class="company-filed">公司地址：</span><span>${company.address
								}</span>
							<br />
							<span class="company-filed">乘车路线：</span><span>${company.busLine
								}</span>
							<br />
							<span class="company-filed">网址：</span><a
								href="javascript:void(0);"
								onclick="gotoUrl('${company.siteUrl }')"}>${company.siteUrl
								}</a>
							<br />
							<span class="company-filed">简介：</span><span>${company.briefInfo
								}</span>
						</div>

					</div>

					<div class="main-col-10" style="margin: 0 0 10px 0;">
						<c:forEach var="middle" items="${row.middleAreas}" varStatus="mi">
							<c:forEach var="ap" items="${middle.advertPics}" varStatus="ai">
								<a
									href="http://g.163.com/c?AID=41636&FlightID=750&Values=2348400489&Redirect=http://itown.163.com/sdk/"
									target="_blank"> <img width="390" height="100" border="0"
										alt="" src=<%=path%>${ap.picUrl}></img> </a>
							</c:forEach>
						</c:forEach>
					</div>
					<div class="main-col-9">
						<c:forEach var="right" items="${row.rightAreas}" varStatus="ri">
							<c:forEach var="ap" items="${right.advertPics}" varStatus="ai">
								<a
									href="http://g.163.com/c?AID=41636&FlightID=750&Values=2348400489&Redirect=http://itown.163.com/sdk/"
									target="_blank"> <img width="360" height="100" border="0"
										alt="" src=<%=path%>${ap.picUrl}></img> </a>
							</c:forEach>
						</c:forEach>
					</div>
				</div>
			</div>
			<table width="960" border=0 cellpadding=0 cellspacing=0>
				<tr>
					<td>
						<div id="www_qpsh_com"
							style="overflow: hidden; height: 140px; width: 960px;">
							<table align=left cellpadding=0 cellspace=0 border=0>
								<tr>
									<td id="www_qpsh_com1" valign="top">
										<table border=0 cellpadding=0 cellspacing=0>
											<tr>
												<c:forEach var="ap" items="${company.advertPics}" varStatus="ai">
													
													<c:if test="${ap.location!=2 && ap.location!=1 && ap.location!=3 && ap.location!=4 && ap.location!=22}">
														<c:if test="${ai.last && (ai.index==0 || ai.index==1 || ai.index==2)}">
															<script>
																str=1;
															</script>
														</c:if>
														<td>
														<a href="javascript:void(0);"><img
																border=0 src="<%=path %>${ap.picUrl }"
																width=150 height=100 hspace=22>
														</a>
														<br>
														<center>
															<b>${ap.picName }</b>
														</center>
													</td>
													<td width=10></td>
													
													</c:if>
												</c:forEach>
												
											</tr>
										</table>
									</td>
									<td id="www_qpsh_com2" valign=top></td>
								</tr>
							</table>
						</div>
						<script>
						  var speed=30//速度数值越大速度越慢
						  var www_qpsh_com2=document.getElementById("www_qpsh_com2");
						  var www_qpsh_com1=document.getElementById("www_qpsh_com1");
						  var www_qpsh_com=document.getElementById("www_qpsh_com");
						  if(str!=1){
						  	www_qpsh_com2.innerHTML=www_qpsh_com1.innerHTML;
						  }
						  function Marquee(){
						  if(www_qpsh_com2.offsetWidth-www_qpsh_com.scrollLeft<=0)
						  www_qpsh_com.scrollLeft-=www_qpsh_com1.offsetWidth
						  else{
						  www_qpsh_com.scrollLeft++
						  }
						  }
						  var MyMar=setInterval(Marquee,speed)
						  www_qpsh_com.onmouseover=function() {clearInterval(MyMar)}
						  www_qpsh_com.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
						  
						  </script>
					</td>
				</tr>
			</table>
	
			<div class="common">
				<!-- <form action="<%=path %>/classify/saveCommentDetail.do" name="common_form"> -->
					<input type="hidden" id="companyId" value=${company.companyId }></input>
					<div class="common-detail">
						<textarea id="commentDet" cols="65" rows=3 style="color: #808080;"
							onblur="if(!this.value)this.value='输入您的评论或建议...';return true;"
							onfocus="if(this.value=='输入您的评论或建议...')this.value='';return true;"
							value="输入您的评论或建议...">输入您的评论或建议...</textarea >
					</div>
					<div style="float:right;width:370px;margin:10px auto;">
						评分：&nbsp;&nbsp;<input type="radio" name="commentGrade" value=1>&nbsp;&nbsp;1分</input>&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="commentGrade" value=2>&nbsp;&nbsp;2分</input>&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="commentGrade" value=3>&nbsp;&nbsp;3分</input>&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="commentGrade" value=4>&nbsp;&nbsp;4分</input>&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="commentGrade" value=5>&nbsp;&nbsp;5分</input></br>
						您的姓名：<input type="text" id="commentator"></input>&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="stronger" value="1">&nbsp;&nbsp;匿名发表</input></br>
						<button onclick="commitComment();">提交</button>
					</div>
					<div style="margin:90px 0 0 0;" id="comment_list">
					</div>
			</div>
			
		</div>
		<script type="text/javascript">
		var store_commnet;
		Ext.onReady(function(){
			store_commnet=new Ext.data.Store({
	    		baseParams:{"companyId":$("#companyId").val()},
				proxy: new Ext.data.HttpProxy({
					url:path+'/classify/getAllCommentDetail.do'
				}),
				reader: new Ext.data.JsonReader({
					root:'root',
					totalProperty: "results",
					fields:[
						{name:'commentDetailId'},
						{name:'commentDet'},
						{name:'commentGrade'},
						{name:'commentator'},
						{name:'commentDate'}
					]
				})
			});
			var grid_commnet=new Ext.grid.GridPanel({
				//autoHeight:true,
				store:store_commnet,
				border:false,
				renderTo:'comment_list',
				autoScroll:true,
				height:310,
				width:958,
				viewConfig: { forceFit:true},
				columns:[
					{header:'',hidden:true,dataindex:'commentDetailId'},
					{header:'评论内容',align:'center',width:300,dataindex:'commentDet'},
					{header:'评分',align:'center',width:40,dataindex:'commentGrade'},
					{header:'评论人',align:'center',width:100,dataindex:'commentator'},
					{header:'评论时间',align:'center',width:120,dataindex:'commentDate'}
				],
				bbar:new Ext.PagingToolbar({
					store:store_commnet,
					displayInfo:true,
					pageSize:12,
					displayMsg:'当前 {0}-{1} 共 {2}条'
				})
			});
			store_commnet.load({
				params:{"start":0,"limit":12}
				});
		});
		
		function commitComment(){
			var commentDet=$("#commentDet").val();
			var companyId=$("#companyId").val();
			var commentator=$("#commentator").val();
			var stronger=$("input[name='stronger']:checked").val();
			var commentGrade=$("input[name='commentGrade']:checked").val();
			var patrn=/['|"|,|<|>|%|$|#|*|”|’|《|》]/;
			if(commentDet=='输入您的评论或建议...' || commentDet==''){
				alert("输入您的评论或建议");
				return ;
			}else{
				var result =  patrn.exec(commentDet);
				if(result!=null){
					alert("您的内容包括不合法字符");
					return;
				}
			}
			if(commentator=='' && stronger!=1){
				alert("输入姓名");
				return;
			}
			if(commentGrade==undefined){
				alert("请评分");
				return;
			}
			$.post("<%=path %>/classify/saveCommentDetail.do",
				{commentDet:commentDet,commentGrade:commentGrade,companyId:companyId,commentator:commentator,stronger:stronger},
				function(){
					$("#commentDet").attr("value","");
					$("#commentator").attr("value","");
					if(stronger==1)
					$("input[name='stronger']:checked")[0].checked=false;
					$("input[name='commentGrade']:checked")[0].checked=false;
					store_commnet.reload();
					
			});
		};
		$(document).ready(function(){
			$('.tab-hd-gg-left li').mouseover(function(){
				$(this).addClass("current").siblings().removeClass().addClass("tab-u");
				$("."+$(this).attr("id")).show().siblings().hide();
			});
			$('.tab-hd-gg-right li').mouseover(function(){
				$(this).addClass("current").siblings().removeClass().addClass("tab-u");
				$("."+$(this).attr("id")).show().siblings().hide();
			});
			$('.tab-hd.tab-u-5 span').mouseover(function(){
				$(this).addClass("current").siblings().removeClass().addClass("tab-u");
				$("."+$(this).attr("id")).show().siblings().hide();
			});
			
			$('.tab-hd.tab-u-10 span').mouseover(function(){
				$(this).addClass("current").siblings().removeClass().addClass("tab-u");
				$("."+$(this).attr("id")).show().siblings().hide();
			});
			
			$('.tab-hd.tab-u-9 span').mouseover(function(){
				$(this).addClass("current").siblings().removeClass().addClass("tab-u");
				$("."+$(this).attr("id")).show().siblings().hide();
			});

		});
		function gotoCompanyDetail(id){
			window.open('<%=path%>/getComDel.do?companyId='+id);
		}
		function gotoFirstClassify(id){
			window.open('<%=path%>/getFirstClassDetail.do?firstId='+id);
		}
		function gotoHeadAdvert(id){
			window.open('<%=path%>/getHeadAdvertDetail.do?headAdvertId='+id,'','');
		}
		function gotoSecontClassify(id){
			window.open('<%=path%>/getSecondClassDetail.do?secondId='+id,'','');
		}
		function gotoIndex(){
			window.open('<%=path%>/gotoIndex.do','','');
		}
		function gotoUrl(url){
			window.open(url,'','');
		}
		
		function forSearch(){
			var sv=$("#searchValue");
			var val=sv.val();
			val=encodeURI(encodeURI(val));
			window.open('<%=path%>/getSearchDetl.do?searchValue='+val,'','');
		}
	</script>
		<%@ include file="footer.jsp"%>
	</body>
</html>
